package com.zito.health.controller;

import com.zito.health.common.result.PlatformResult;
import com.zito.health.entity.ItemIncharge;
import com.zito.health.service.ItemInchargeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 项目负责人
 */
@Slf4j
@RestController
@RequestMapping("/item/incharge")
public class ItemInchargeController {

    @Autowired
    private ItemInchargeService itemInchargeService;

    @PostMapping("/save")
    public PlatformResult save(ItemIncharge item){
        itemInchargeService.save(item);
        return PlatformResult.success();
    }

    @PostMapping("/update")
    public PlatformResult update(ItemIncharge item){
        itemInchargeService.update(item);
        return PlatformResult.success();
    }

    @PostMapping("/query")
    public PlatformResult query(ItemIncharge item){
        return PlatformResult.success(itemInchargeService.query(item));
    }

}
